<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/common.jsp"%>
<!DOCTYPE html>
<html lang="zh">
<meta charset="utf-8">
<head></head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-taxRegistration-add">
			<input type="hidden" name="taxpayerId" value="${taxpayer.taxpayerId }" />

			<div class="form-group">
				<label class="col-sm-3 control-label">纳税人：</label>
				<div class="col-sm-8">
					<input id="txOwner" name="txOwner" class="form-control" value="${taxpayer.taxpayerName}" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位名称：</label>
				<div class="col-sm-8">
					<input id="txCompany" name="txCompany" value="${taxpayer.taxpayerCompanyName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">经营地点：</label>
				<div class="col-sm-8">
					<input id="txCompanyAddress" name="txCompanyAddress" value="${taxpayer.taxpayerAddress}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">证件类型：</label>
				<div class="col-sm-8">
					<select id="txOwnerIdCardType" name="txOwnerIdCardType" class="form-control">
						<option value="1" ${taxpayer.taxOwnerIdCardNum == 1?'selected':''}>身份证</option>
						<option value="2" ${taxpayer.taxOwnerIdCardNum == 2?'selected':''}>港澳台通行证</option>
						<option value="3" ${taxpayer.taxOwnerIdCardNum == 3?'selected':''}>结婚证</option>
						<option value="4" ${taxpayer.taxOwnerIdCardNum == 4?'selected':''}>驾驶证</option>
						<option value="5" ${taxpayer.taxOwnerIdCardNum == 5?'selected':''}>其他</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">证件号码：</label>
				<div class="col-sm-8">
					<input id="txOwnerIdCardNum" name="txOwnerIdCardNum" value="${taxpayer.taxOwnerIdCardNum}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">登记类型：</label>
				<div class="col-sm-8">
					<select id="txType" name="txType" class="form-control">
						<option value="1">开业税务登记</option>
						<!-- <option value="2">变更税务登记</option>
                    <option value="3">停业复业税务登记</option>
                    <option value="4">外出经营报登记</option>
                    <option value="5">注销税务登记</option> -->
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">生产经营方式：</label>
				<div class="col-sm-8">
					<select id="txModel" name="txModel" class="form-control">
						<option value="1">个人独立经营方式</option>
						<option value="2">合伙经营方式</option>
						<option value="3">有限责任公司</option>
					</select>

				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">注册资金：</label>
				<div class="col-sm-8">
					<div class="input-group">
						<input id="txRegisteredCapital" name="txRegisteredCapital" class="form-control" type="number" />
						<div class="input-group-addon">万元</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">投资总额：</label>
				<div class="col-sm-8">
					<div class="input-group">
						<input id="txTotalInvestment" name="txTotalInvestment" class="form-control" type="number" />
						<div class="input-group-addon">万元</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">生产经营期限：</label>
				<div class="col-sm-8">
					<input id="txEndTime" name="txEndTime" class="form-control" type="text" readonly />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">财务负责人：</label>
				<div class="col-sm-8">
					<input id="txFinancialManager" name="txFinancialManager" class="form-control" type="text" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">联系电话：</label>
				<div class="col-sm-8">
					<input id="txPhone" name="txPhone" class="form-control" value="${taxpayer.taxpayerTel}" type="text">
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript">
		var prefix = "${ctx}/system/registration"
		$("#form-taxRegistration-add").validate({
			rules : {
				txCompany : {
					required : true,
					minlength : 2,
					maxlength : 20,
				},
				txCompanyAddress : {
					required : true,
					minlength : 2,
					maxlength : 20,
				},
				txOwner : {
					required : true,
					minlength : 2,
					maxlength : 20,
				},
				txOwnerIdCardNum : {
					required : true,
					minlength : 2,
					maxlength : 20,
				},
				txType : {
					required : true,
				},
				txModel : {
					required : true,
				},
				txRegisteredCapital : {
					required : true,
					minlength : 2,
					maxlength : 11,
				},
				txFinancialManager : {
					required : true,
					minlength : 2,
					maxlength : 20,
				},
				txPhone : {
					required : true, 
	                isMobile: true
				},
				txEndTime : {
					required : true,
				},
				txTotalInvestment : {
					required : true,
					minlength : 2,
					maxlength : 11,
				}
			}
		});
	
		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/add", $('#form-taxRegistration-add').serialize());
			}
		}
	
		zaneDate({
			elem : '#txEndTime',
			format : 'yyyy-MM-dd'
		})
	</script>
</body>
</html>
